package com.jianglin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.HttpRequestHandler;

import java.io.IOException;
import java.io.PrintWriter;
@Controller("/hello1")
public class HelloController1 implements HttpRequestHandler {

    @Override
    public void handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException {
        response.setContentType("text/html;charset=utf-8");
        PrintWriter out = response.getWriter();
        out.println("<h1>Hello World(HttpRequestHandler)</h1>");
        out.flush();
        out.close();
    }
}
